home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / x11 / config / sv4Lib.rules < prev    next >
Text File  |  1997-08-26  |  17KB  |  505 lines

  1. XCOMM $XConsortium: sv4Lib.rules,v 1.8 91/07/19 15:38:53 rws Exp $
  2.  
  3. /*
  4.  * SVR4 shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES 
  9. #endif
  10. #ifndef SharedDataSeparation
  11. #define SharedDataSeparation NO
  12. #endif
  13. #ifndef SharedCodeDef
  14. #define SharedCodeDef /**/
  15. #endif
  16. #ifndef SharedLibraryDef
  17. #define SharedLibraryDef /**/
  18. #endif
  19. #ifndef ShLibIncludeFile
  20. #define ShLibIncludeFile <sv4Lib.tmpl>
  21. #endif
  22. #ifndef SharedLibraryLoadFlags
  23. #define SharedLibraryLoadFlags -G -z text
  24. #endif
  25. #ifndef PositionIndependentCFlags
  26. #define PositionIndependentCFlags -K PIC
  27. #endif
  28.  
  29. /*
  30.  * InstallSharedLibrary - generate rules to install the shared library.
  31.  */
  32. #ifndef InstallSharedLibrary
  33. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  34. install:: Concat(lib,libname.so.rev)                     @@\
  35.     MakeDir($(DESTDIR)dest)                        @@\
  36.     $(INSTALL) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest; @@\
  37.     (cd $(DESTDIR)dest; $(RM) Concat(lib,libname.so); $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so))
  38. #endif /* InstallSharedLibrary */
  39.  
  40. #ifndef InstallSharedLibrary1
  41. #define    InstallSharedLibrary1(libname,dest)        @@\
  42. install:: libname                     @@\
  43.     MakeDir($(DESTDIR)dest)                @@\
  44.     $(INSTALL) $(INSTLIBFLAGS) libname $(DESTDIR)dest
  45. #endif /* InstallSharedLibrary1 */
  46.  
  47. /*
  48.  * InstallSharedLibraryData - generate rules to install the shared library data
  49.  */
  50. #ifndef InstallSharedLibraryData
  51. #define    InstallSharedLibraryData(libname,rev,dest)
  52. #endif /* InstallSharedLibraryData */
  53.  
  54.  
  55. /*
  56.  * SharedLibraryTarget - generate rules to create a shared library;
  57.  * build it into a different name so that we do not hose people by having
  58.  * the library gone for long periods.
  59.  */
  60. #ifndef SharedLibraryTarget
  61. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  62. AllTarget(Concat(lib,libname.so.rev))                    @@\
  63.                                     @@\
  64. Concat(lib,libname.so.rev):  solist                    @@\
  65.     $(RM) ~$@                            @@\
  66.     (cd down; $(LD) -o up/~$@ $(SHLIBLDFLAGS) -h $@ solist)        @@\
  67.     $(RM) $@                             @@\
  68.     $(MV) ~$@ $@                        @@\
  69.     $(RM) Concat(lib,libname.so)                    @@\
  70.     $(LN) $@ Concat(lib,libname.so)                    @@\
  71.                                     @@\
  72. clean::                                    @@\
  73.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  74.  
  75. #endif /* SharedLibraryTarget */
  76.  
  77. #ifndef SharedLibraryTarget_a
  78. #define SharedLibraryTarget_a(libname,rev,solist,extlibs,down,up)            @@\
  79. AllTarget(Concat(lib,libname.so.rev))                    @@\
  80.                                     @@\
  81. Concat(lib,libname.so.rev):  solist                    @@\
  82.     $(RM) ~$@                            @@\
  83.     (cd down; $(LD) -o up/~$@ $(SHLIBLDFLAGS) -h $@ solist extlibs)    @@\
  84.     $(RM) $@                             @@\
  85.     $(MV) ~$@ $@                        @@\
  86.     $(RM) Concat(lib,libname.so)                    @@\
  87.     $(LN) $@ Concat(lib,libname.so)                    @@\
  88.                                     @@\
  89. clean::                                    @@\
  90.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  91.  
  92. #endif /* SharedLibraryTarget_a */
  93.  
  94. #ifndef SpecialSharedLibraryTarget
  95. #define SpecialSharedLibraryTarget(libname,rev,hname,solist,down,up)            @@\
  96. AllTarget(Concat(lib,libname.so.rev))                    @@\
  97.                                     @@\
  98. Concat(lib,libname.so.rev):  solist                    @@\
  99.     $(RM) ~$@                            @@\
  100.     (cd down; $(LD) -o up/~$@ $(SHLIBLDFLAGS) -h hname solist)        @@\
  101.     $(RM) $@                             @@\
  102.     $(MV) ~$@ $@                            @@\
  103.     $(CP) $@ ../hname                        @@\
  104.                                     @@\
  105. clean::                                    @@\
  106.     $(RM) Concat(lib,libname.so.rev)
  107.  
  108. #endif /* SpecialSharedLibraryTarget */
  109.  
  110. #if UslLocalityTuning
  111. /*
  112.  * InstallFurLibrary - generate rules to install a Fur library.
  113.  */
  114.  
  115. #ifndef FurSharedLibraryTarget3
  116. #define FurSharedLibraryTarget3(libname,rev,objs1,objs2,objs3,extlibs,down,up)    @@\
  117. AllTarget(Concat(lib,libname.so.F))                    @@\
  118.                                     @@\
  119. Concat(lib,libname.so.F):  objs1 objs2 objs3                @@\
  120.     $(RM) libname.r* ~$@                        @@\
  121.     (cd down; $(LD) -r -o up/r1.libname objs1)             @@\
  122.     (cd down; $(LD) -r -o up/r2.libname objs2)             @@\
  123.     (cd down; $(LD) -r -o up/r3.libname objs3)             @@\
  124.     $(LD) -r -o r.libname r1.libname r2.libname r3.libname        @@\
  125.     $(FUR) -l libname.funcs r.libname                @@\
  126.     $(LD) -o ~$@ $(SHLIBLDFLAGS) -h Concat(lib,libname.so.rev) r.libname extlibs    @@\
  127.     $(RM) $@                             @@\
  128.     $(MV) ~$@ $@                             @@\
  129.     $(RM) Concat(lib,libname.so)                     @@\
  130.     $(LN) $@ Concat(lib,libname.so)                    @@\
  131.     $(RM) r1.libname r2.libname r3.libname                @@\
  132.                                     @@\
  133. clean::                                    @@\
  134.     $(RM) r.libname Concat(lib,libname.so.F)
  135.  
  136. #endif /* FurSharedLibraryTarget3 */
  137.  
  138. #ifndef FurSharedLibraryTarget
  139. #define FurSharedLibraryTarget(libname,rev,solist,down,up)        @@\
  140. AllTarget(Concat(lib,libname.so.F))                    @@\
  141.                                     @@\
  142. Concat(lib,libname.so.F):  solist                    @@\
  143.     $(RM) r.libname* ~$(@)                    @@\
  144.     (cd down; $(LD) -r -o up/r.libname solist)            @@\
  145.     $(FUR) -l libname.funcs r.libname                @@\
  146.     $(LD) -o ~$@ $(SHLIBLDFLAGS) -h Concat(lib,libname.so.rev) r.libname    @@\
  147.     $(RM) $@                             @@\
  148.     $(MV) ~$@ $@                            @@\
  149.     $(RM) Concat(lib,libname.so)                     @@\
  150.     $(LN) $@ Concat(lib,libname.so)                    @@\
  151.                                     @@\
  152. clean::                                    @@\
  153.     $(RM) r.libname Concat(lib,libname.so.F)
  154.  
  155. #endif /* FurSharedLibraryTarget */
  156.  
  157. #ifndef FurSharedLibraryTarget_a
  158. #define FurSharedLibraryTarget_a(libname,rev,solist,extlibs,down,up)        @@\
  159. AllTarget(Concat(lib,libname.so.F))                    @@\
  160.                                     @@\
  161. Concat(lib,libname.so.F):  solist                    @@\
  162.     $(RM) r.libname* ~$(@)                        @@\
  163.     (cd down; $(LD) -r -o up/r.libname solist)            @@\
  164.     $(FUR) -l libname.funcs r.libname                @@\
  165.     $(LD) -o ~$@ $(SHLIBLDFLAGS) -h Concat(lib,libname.so.rev) r.libname extlibs    @@\
  166.     $(RM) $@                             @@\
  167.     $(MV) ~$@ $@                            @@\
  168.     $(RM) Concat(lib,libname.so)                     @@\
  169.     $(LN) $@ Concat(lib,libname.so)                    @@\
  170.                                     @@\
  171. clean::                                    @@\
  172.     $(RM) r.libname Concat(lib,libname.so.F)
  173.  
  174. #endif /* FurSharedLibraryTarget_a */
  175.  
  176. #ifndef SpecialFurSharedLibraryTarget
  177. #define SpecialFurSharedLibraryTarget(libname,rev,hname,solist,down,up)    @@\
  178. AllTarget(Concat(lib,libname.so.F))                    @@\
  179.                                     @@\
  180. Concat(lib,libname.so.F):  solist                    @@\
  181.     $(RM) r.libname* ~$(@)                        @@\
  182.     (cd down; $(LD) -r -o up/r.libname solist)            @@\
  183.     $(FUR) -l libname.funcs r.libname                @@\
  184.     $(LD) -o ~$@ $(SHLIBLDFLAGS) -h hname r.libname            @@\
  185.     $(RM) $@                             @@\
  186.     $(MV) ~$@ $@                            @@\
  187.     $(RM) Concat(lib,libname.so)                     @@\
  188.     $(LN) $@ Concat(lib,libname.so)                    @@\
  189.                                     @@\
  190. clean::                                    @@\
  191.     $(RM) r.libname Concat(lib,libname.so.F)
  192.  
  193. #endif /* SpecialFurSharedLibraryTarget */
  194.  
  195. #ifndef InstallFurLibrary
  196. #define    InstallFurLibrary(libname,rev,dest)                @@\
  197. install:: Concat(lib,libname.so.F)                     @@\
  198.     MakeDir($(DESTDIR)dest/NOFUR)                    @@\
  199.     $(MV) $(DESTDIR)dest/Concat(lib,libname.so.rev) $(DESTDIR)dest/NOFUR; @@\
  200.     $(INSTALL) $(INSTLIBFLAGS) Concat(lib,libname.so.F) $(DESTDIR)dest; @@\
  201.     $(MV) $(DESTDIR)dest/Concat(lib,libname.so.F) $(DESTDIR)dest/Concat(lib,libname.so.rev); @@\
  202.     $(RM) $(DESTDIR)dest/Concat(lib,libname.so)            @@\
  203.     (cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so))
  204. #endif /* InstallFurLibrary */
  205.  
  206. #else /* UslLocalityTuning */
  207.  
  208. #define FurSharedLibraryTarget3(libname,rev,objs1,objs2,objs3,extlibs,down,up)    @@\
  209. $(_NULLCMD_)
  210.  
  211. #define FurSharedLibraryTarget(libname,rev,solist,down,up)        @@\
  212. $(_NULLCMD_)
  213. #define FurSharedLibraryTarget_a(libname,rev,solist,extlibs,down,up)    @@\
  214. $(_NULLCMD_)
  215. #define SpecialFurSharedLibraryTarget(libname,rev,hname,solist,down,up)    @@\
  216. $(_NULLCMD_)
  217. #define    InstallFurLibrary(libname,rev,dest)                @@\
  218. $(_NULLCMD_)
  219.  
  220. #endif /* UslLocalityTuning */
  221.  
  222. /*
  223.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  224.  */
  225. #ifndef SharedLibraryDataTarget
  226. #define SharedLibraryDataTarget(libname,rev,salist)
  227. #endif /* SharedLibraryTarget */
  228.  
  229.  
  230. /*
  231.  * USL, SVR4 SPECIAL RULES: add new rules as needed.
  232.  */
  233. #ifndef SharedLibraryObjectRule
  234. #define SharedLibraryObjectRule()                    @@\
  235. .c.o:                                    @@\
  236.     $(CC) -c -KPIC $(CFLAGS) $<
  237. #endif
  238.  
  239. /*
  240.  * InstallMsgCatalog - generate rules to install the i18n message catalogs
  241.  */
  242. #ifndef InstallMsgCatalog
  243. #define       InstallMsgCatalog(catname)              @@\
  244. install:: catname.str                                 @@\
  245.       MakeDir($(MSGCATDIR))                           @@\
  246.       $(INSTALL) $(INSTALLFLAGS) catname.str $(MSGCATDIR)/catname.str
  247. #endif /* InstallMsgCatalog */
  248.  
  249. #ifndef SharedLibraryTarget1
  250. #define SharedLibraryTarget1(libname,rev,solist,down,up)        @@\
  251. AllTarget(Concat(lib,libname.so.rev))                    @@\
  252.                                     @@\
  253. Concat(lib,libname.so.rev):  solist                    @@\
  254.     -@if [ -f $@ ]; then $(MV) $@ O$@; fi                @@\
  255.     (cd down; $(CC) -G -o up/$@ $(SHLIBLDFLAGS) -h $@ solist)    @@\
  256.     $(RM) Concat(lib,libname.so)                    @@\
  257.     $(LN) $@ Concat(lib,libname.so)                    @@\
  258.                                     @@\
  259. clean::                                    @@\
  260.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  261. #endif
  262.  
  263. #ifndef SharedLibraryTarget2
  264. #define SharedLibraryTarget2(libname,solist,down,up)        @@\
  265. AllTarget(Concat(lib,libname.so))                    @@\
  266.                                     @@\
  267. Concat(lib,libname.so):  solist                    @@\
  268.     $(RM) ~$@                            @@\
  269.     (cd down; $(CC) -G -o up/~$@ $(SHLIBLDFLAGS) -h $@ solist)    @@\
  270.     $(RM) $@                             @@\
  271.     $(MV) ~$@ $@                        @@\
  272.                                     @@\
  273. clean::                                    @@\
  274.     $(RM) Concat(lib,libname.so)
  275. #endif
  276.  
  277. /*
  278.  * SharedLibraryTarget3 - generate rules to create a shared library;
  279.  * build it into a different name so that we do not hose people by having
  280.  * the library gone for long periods.
  281.  *
  282.  * This is similar to SharedLibraryTarget but if the argument list is too
  283.  * long, it fails on some machines; So, build the shared library incrementally
  284.  * with OBJS1, OBJS2 and OBJS3
  285.  */
  286. #ifndef SharedLibraryTarget3
  287. #define SharedLibraryTarget3(libname,rev,objs1,objs2,objs3,down,up)    @@\
  288. AllTarget(Concat(lib,libname.so.rev))                    @@\
  289.                                     @@\
  290. Concat(lib,libname.so.rev):  objs1 objs2 objs3                @@\
  291.     $(RM) ~$@                            @@\
  292.     (cd down; $(LD) -r -o up/r1.$(@) objs1)             @@\
  293.     (cd down; $(LD) -r -o up/r2.$(@) objs2)             @@\
  294.     (cd down; $(LD) -o up/~$@ $(SHLIBLDFLAGS) -h $(@) up/r1.$(@) up/r2.$(@) objs3) @@\
  295.     $(RM) $@                             @@\
  296.     $(MV) ~$@ $@                             @@\
  297.     $(RM) Concat(lib,libname.so)                    @@\
  298.     $(LN) $@ Concat(lib,libname.so)                    @@\
  299.     $(RM) r1.$(@) r2.$(@)                         @@\
  300.                                     @@\
  301. clean::                                    @@\
  302.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  303.  
  304. #endif /* SharedLibraryTarget3 */
  305.  
  306. #ifndef SharedLibraryTarget3a
  307. #define SharedLibraryTarget3a(libname,rev,objs1,objs2,objs3,extlibs,down,up)@@\
  308. AllTarget(Concat(lib,libname.so.rev))                    @@\
  309.                                     @@\
  310. Concat(lib,libname.so.rev):  objs1 objs2 objs3                @@\
  311.     $(RM) ~$@                            @@\
  312.     (cd down; $(LD) -r -o up/r1.$(@) objs1)             @@\
  313.     (cd down; $(LD) -r -o up/r2.$(@) objs2)             @@\
  314.     (cd down; $(LD) -o up/~$@ $(SHLIBLDFLAGS) -h $(@) up/r1.$(@) up/r2.$(@) objs3 extlibs) @@\
  315.     $(RM) $@                             @@\
  316.     $(MV) ~$@ $@                             @@\
  317.     $(RM) Concat(lib,libname.so)                    @@\
  318.     $(LN) $@ Concat(lib,libname.so)                    @@\
  319.     $(RM) r1.$(@) r2.$(@)                         @@\
  320.                                     @@\
  321. clean::                                    @@\
  322.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  323.  
  324. #endif /* SharedLibraryTarget3a */
  325.  
  326. /*
  327.  * SharedLibraryDepTarget - generate rules to create a shared library;
  328.  * build it into a different name so that we do not hose people by having
  329.  * the library gone for long periods.  This lib will be dependent on the
  330.  * deplib argument library.
  331.  */
  332. #ifndef SharedLibraryDepTarget
  333. #define SharedLibraryDepTarget(libname,rev,solist,down,up,deplib)            @@\
  334. AllTarget(Concat(lib,libname.so.rev))                    @@\
  335.                                     @@\
  336. Concat(lib,libname.so.rev):  solist                    @@\
  337.     $(RM) ~$@                            @@\
  338.     (cd down; $(LD) -o up/~$@ $(SHLIBLDFLAGS) -h $@ solist deplib)        @@\
  339.     $(RM) $@                             @@\
  340.     $(MV) ~$@ $@                        @@\
  341.     $(RM) Concat(lib,libname.so)                    @@\
  342.     $(LN) $@ Concat(lib,libname.so)                    @@\
  343.                                     @@\
  344. clean::                                    @@\
  345.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  346.  
  347. #endif /* SharedLibraryDepTarget */
  348.  
  349. /* The following needs to be outside of `#if BuildDtRuntimeLib'
  350.  * otherwise, lib/DtRuntime will fail when BuildDtRuntimeLib is NO
  351.  */
  352. #ifndef SharedDtRuntimeRev
  353. #define SharedDtRuntimeRev    1
  354. #endif
  355. #ifndef DtRuntimeLibLoc
  356. #define DtRuntimeLibLoc        $(LIBSRC)/DtRuntime
  357. #endif
  358. #ifndef DtRuntimeLibDest
  359. #define DtRuntimeLibDest    $(DESKTOPDIR)
  360. #endif
  361. #ifndef DtRuntimeLib
  362. #define DtRuntimeLib        dtruntime.so.$(SODTRUNTIMEREV)
  363. #endif
  364. #ifndef DtRuntimeLibName
  365. #define DtRuntimeLibName    dtruntime
  366. #endif
  367.  
  368.    SODTRUNTIMEREV = SharedDtRuntimeRev
  369.   DTRUNTIMELIBLOC = DtRuntimeLibLoc
  370.  DTRUNTIMELIBDEST = DtRuntimeLibDest
  371.      DTRUNTIMELIB = DtRuntimeLib
  372.  DTRUNTIMELIBNAME = DtRuntimeLibName
  373.   LIBDTRUNTIMEPFX = M
  374.  
  375. #if BuildDtRuntimeLib
  376.  
  377. #define SPLIT_DTRUNTIME
  378. #ifdef SPLIT_DTRUNTIME
  379.  
  380. #define SplitDtRuntime(name,prefix,dest)                @@\
  381. install::                                @@\
  382.     chmod +x $(DTRUNTIMELIBLOC)/split_lib                @@\
  383.     $(RM) $(DESTDIR)dest/prefix.aa $(DESTDIR)dest/prefix.ab        @@\
  384.     if [ -f $(DESTDIR)dest/name ];\                    @@\
  385.     then $(DTRUNTIMELIBLOC)/split_lib $(DTRUNTIMELIBLOC)/name prefix $(DESTDIR)dest; fi @@\
  386.                                     @@\
  387. PreciousObject($(DTRUNTIMELIBLOC)/split_lib)
  388.  
  389. #else    /* SPLIT_DTRUNTIME */
  390.  
  391. #define SplitDtRuntime(name,prefix,dest)
  392.  
  393. #endif    /* SPLIT_DTRUNTIME */
  394.  
  395. #if UslLocalityTuning
  396.  
  397. /* NOFUR shall already exist if `if' block is invoked! */
  398. #define InstFurDtRuntime(libname,rev)                    @@\
  399. install:: Concat(lib,libname.so.rev)                    @@\
  400.     if [ -f $(DTRUNTIMELIBDEST)/$(DTRUNTIMELIB) ];\            @@\
  401.       then ($(MV) $(DTRUNTIMELIBDEST)/$(DTRUNTIMELIB) $(DTRUNTIMELIBDEST)/NOFUR;\ @@\
  402.            $(INSTALL) $(INSTLIBFLAGS) $(DTRUNTIMELIBLOC)/$(DTRUNTIMELIBNAME).so.F $(DTRUNTIMELIBDEST);\ @@\
  403.            $(MV) $(DTRUNTIMELIBDEST)/$(DTRUNTIMELIBNAME).so.F $(DTRUNTIMELIBDEST)/$(DTRUNTIMELIB)); fi
  404.  
  405. #else /* UslLocalityTuning */
  406.  
  407. #define InstFurDtRuntime(libname,rev)
  408.  
  409. #endif /* UslLocalityTuning */
  410.  
  411. #ifndef InstallSharedLibrary_m
  412. #define    InstallSharedLibrary_m(libname,rev,dest)            @@\
  413. install:: Concat(lib,libname.so.rev)                     @@\
  414.     MakeDir($(DESTDIR)dest)                        @@\
  415.     (cd $(DESTDIR)dest; $(RM) Concat(lib,libname.so.rev))        @@\
  416.     (cd $(DESTDIR)dest; $(RM) Concat(lib,libname.so))        @@\
  417.     $(INSTALL) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest; @@\
  418.     (cd $(DESTDIR)dest; $(MV) Concat(lib,libname.so.rev) Concat(lib,libname.so)) @@\
  419.     (cd $(DESTDIR)dest;\                        @@\
  420.       if [ -f $(DTRUNTIMELIBDEST)/$(DTRUNTIMELIB) ];\        @@\
  421.       then $(LN) $(DTRUNTIMELIBDEST)/$(DTRUNTIMELIB) Concat(lib,libname.so.rev);\    @@\
  422.       else $(LN) Concat(lib,libname.so) Concat(lib,libname.so.rev);\@@\
  423.     fi)                                @@\
  424.     if [ -f $(DTRUNTIMELIBDEST)/$(DTRUNTIMELIB) ];\            @@\
  425.       then $(INSTALL) $(INSTLIBFLAGS) $(DTRUNTIMELIBLOC)/$(DTRUNTIMELIB) $(DTRUNTIMELIBDEST); fi @@\
  426.                                     @@\
  427. InstFurDtRuntime(libname,rev)                        @@\
  428. SplitDtRuntime($(DTRUNTIMELIB),$(DTRUNTIMELIBNAME),$(DTRUNTIMELIBDEST))
  429. #endif /* InstallSharedLibrary_m */
  430.  
  431. #ifndef CreateRelocatableObjs
  432. #define CreateRelocatableObjs(libname,solist,down,up)            @@\
  433. AllTarget(Concat($(LIBDTRUNTIMEPFX),.libname))                @@\
  434.                                     @@\
  435. Concat($(LIBDTRUNTIMEPFX),.libname):    solist                @@\
  436.     (cd down; $(LD) -r -o up/$@ solist)                @@\
  437.     (cd $(DTRUNTIMELIBLOC);\                    @@\
  438.      if [ -f $(DTRUNTIMELIB) ]; then $(MAKE) all; fi)        @@\
  439.                                     @@\
  440. install:: Concat($(LIBDTRUNTIMEPFX),.libname)                @@\
  441.                                     @@\
  442. clean::                                    @@\
  443.     $(RM) Concat($(LIBDTRUNTIMEPFX),.libname)
  444.  
  445. #endif /* CreateRelocatableObjs */
  446.  
  447. #ifndef CreateRelocatableObjs3
  448. #define CreateRelocatableObjs3(libname,objs1,objs2,objs3,down,up)    @@\
  449. AllTarget(Concat($(LIBDTRUNTIMEPFX),.libname))                @@\
  450.                                     @@\
  451. Concat($(LIBDTRUNTIMEPFX),.libname):    objs1 objs2 objs3        @@\
  452.     (cd down; $(LD) -r -o up/m1.$(@) objs1)                @@\
  453.     (cd down; $(LD) -r -o up/m2.$(@) objs2)                @@\
  454.     (cd down; $(LD) -r -o up/m3.$(@) objs3)                @@\
  455.     (cd down; $(LD) -r -o up/$@ up/m1.$(@) up/m2.$(@) up/m3.$(@))    @@\
  456.     $(RM) m1.$(@) m2.$(@) m3.$(@)                    @@\
  457.     (cd $(DTRUNTIMELIBLOC);\                    @@\
  458.      if [ -f $(DTRUNTIMELIB) ]; then $(MAKE) all; fi)        @@\
  459.                                     @@\
  460. install:: Concat($(LIBDTRUNTIMEPFX),.libname)                @@\
  461.                                     @@\
  462. clean::                                    @@\
  463.     $(RM) Concat($(LIBDTRUNTIMEPFX),.libname)
  464.  
  465. #endif /* CreateRelocatableObjs3 */
  466.  
  467. #else /* BuildDtRuntimeLib */
  468.  
  469. #define InstallSharedLibrary_m    InstallSharedLibrary
  470. #define CreateRelocatableObjs(libname,solist,down,up)
  471. #define CreateRelocatableObjs3(libname,objs1,objs2,objs3,down,up)
  472. #define SplitDtRuntime(name,prefix,dest)
  473.  
  474. #endif /* BuildDtRuntimeLib */
  475.  
  476. /*
  477.  *    CleanNameDefs - this rule will be used by libXm, libDtWidget,
  478.  *        libMGizmo, and libMDtI. At the build time,
  479.  *        NameDefs.h will be inserted into C files in
  480.  *        these directories. The clean target below
  481.  *        will remove those lines.
  482.  */
  483. #ifndef CleanNameDefs
  484.  
  485. #define CleanNameDefs(start,end,srclist,key)            @@\
  486. clean::                                @@\
  487.     @(set -x; for i in srclist; do \            @@\
  488.         (set +e; grep "^key" $$i >/dev/null 2>&1; \    @@\
  489.          if [ $$? -eq 0 ]; then \            @@\
  490.             sed -e "start,end" $$i > tmp.c; \    @@\
  491.             $(MV) -f tmp.c $$i; \            @@\
  492.          fi); \                        @@\
  493.     done)                            @@\
  494.                                 @@\
  495. clean_files:: $(FILES)                        @@\
  496.     @(set -x; for i in $(FILES); do \            @@\
  497.         (set +e; grep "^key" $$i >/dev/null 2>&1; \    @@\
  498.          if [ $$? -eq 0 ]; then \            @@\
  499.             sed -e "start,end" $$i > tmp.c; \    @@\
  500.             $(MV) -f tmp.c $$i; \            @@\
  501.          fi); \                        @@\
  502.     done)
  503.  
  504. #endif /* CleanNameDefs */
  505.